/*
 *  Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 *  This source code is licensed under the MIT license found in the LICENSE
 *  file in the root directory of this source tree.
 *
 */

/*
 *  THIS FILE IS AUTOGENERATED. DO NOT MODIFY IT; ALL CHANGES WILL BE LOST IN
 *  VAIN.
 *
 *  @generated
 */
#pragma once

#include <memory>
#include <string>
#include <utility>

#include <folly/Optional.h>
#include <folly/io/IOBuf.h>
#include <mcrouter/lib/carbon/CarbonProtocolReader.h>
#include <mcrouter/lib/carbon/CommonSerializationTraits.h>
#include <mcrouter/lib/carbon/Keys.h>
#include <mcrouter/lib/carbon/ReplyCommon.h>
#include <mcrouter/lib/carbon/RequestCommon.h>
#include <mcrouter/lib/carbon/RequestReplyUtil.h>
#include <mcrouter/lib/carbon/Result.h>
#include <mcrouter/lib/carbon/TypeList.h>
#include <mcrouter/lib/carbon/Variant.h>

#include "mcrouter/lib/carbon/example/gen/gen-cpp2/HelloGoodbye_types.h"

#include "mcrouter/lib/network/gen/CommonMessages.h"

namespace hellogoodbye {

using EnumUInt32 = hellogoodbye::thrift::EnumUInt32;

std::string enumEnumUInt32ToString(EnumUInt32 val);

class HelloReply;

class HelloRequest : public carbon::RequestCommon, public hellogoodbye::thrift::HelloRequest {
 public:
  using reply_type = HelloReply;

  static constexpr size_t typeId = 65;
  static constexpr const char* name = "hello";

  HelloRequest() = default;
  HelloRequest(const HelloRequest&) = default;
  HelloRequest& operator=(const HelloRequest&) = default;
  HelloRequest(HelloRequest&&) = default;
  HelloRequest& operator=(HelloRequest&&) = default;
  explicit HelloRequest(folly::StringPiece sp) {
    key_ref() = sp;
  }
  explicit HelloRequest(folly::IOBuf&& carbonKey) {
    key_ref() = std::move(carbonKey);
  }

  friend class apache::thrift::Cpp2Ops<HelloRequest>;

};

class HelloReply : public carbon::ReplyCommon, public hellogoodbye::thrift::HelloReply {
 public:

  static constexpr size_t typeId = 66;

  HelloReply() = default;
  HelloReply(const HelloReply&) = default;
  HelloReply& operator=(const HelloReply&) = default;
  HelloReply(HelloReply&&) = default;
  HelloReply& operator=(HelloReply&&) = default;
  explicit HelloReply(carbon::Result carbonResult) {
    result_ref() = carbonResult;
  }

  friend class apache::thrift::Cpp2Ops<HelloReply>;

};

class GoodbyeReply;

class GoodbyeRequest : public carbon::RequestCommon, public hellogoodbye::thrift::GoodbyeRequest {
 public:
  using reply_type = GoodbyeReply;

  static constexpr size_t typeId = 67;
  static constexpr const char* name = "goodbye";

  GoodbyeRequest() = default;
  GoodbyeRequest(const GoodbyeRequest&) = default;
  GoodbyeRequest& operator=(const GoodbyeRequest&) = default;
  GoodbyeRequest(GoodbyeRequest&&) = default;
  GoodbyeRequest& operator=(GoodbyeRequest&&) = default;
  explicit GoodbyeRequest(folly::StringPiece sp) {
    key_ref() = sp;
  }
  explicit GoodbyeRequest(folly::IOBuf&& carbonKey) {
    key_ref() = std::move(carbonKey);
  }

  friend class apache::thrift::Cpp2Ops<GoodbyeRequest>;

};

class GoodbyeReply : public carbon::ReplyCommon, public hellogoodbye::thrift::GoodbyeReply {
 public:

  static constexpr size_t typeId = 68;

  GoodbyeReply() = default;
  GoodbyeReply(const GoodbyeReply&) = default;
  GoodbyeReply& operator=(const GoodbyeReply&) = default;
  GoodbyeReply(GoodbyeReply&&) = default;
  GoodbyeReply& operator=(GoodbyeReply&&) = default;
  explicit GoodbyeReply(carbon::Result carbonResult) {
    result_ref() = carbonResult;
  }

  friend class apache::thrift::Cpp2Ops<GoodbyeReply>;

};
} // namespace hellogoodbye

#include "HelloGoodbyeMessages-inl.h"
